<form name="filtre" method="POST" action="index.php?controller=seance&action=index">
	<table>
		<tr>
                    <th>
                        <label for="dateDeb">A partir du:</label>
                    </th>
                    <td>
                        <input type="text" size="20" name="dateDeb" class="date"  style="cursor: text" value="<?php echo $formFilter->getDateDeb(); ?>" /><br />
                    </td>
		</tr>
                <tr>
                    <th>
                        <br><label for="dateFin">jusqu'au:</label>
                    </th>
                    <td>
                        <br><input type="text" size="20" name="dateFin"  class="date" style="cursor: text" value="<?php echo $formFilter->getDateFin(); ?>" /><br />
                    </td>
		</tr>
                    <tr>
                    <th>
                        <br><label for="numEp">Matière:</label>
                    </th>
                    <td>
                        <br><select name="numEp" id="fieldEp">
                            <option value=""></option>
                        <?php foreach ($listEP as $key => $ep) {
                        ?><option value='<?php echo $ep["numEP"] ?>' <?php echo ($ep["numEP"]==$formFilter->getNumEp()?"selected='selected'":"") ?> ><?php echo $ep["libelleEP"]?></option>
                        <?php }?>
                        </select>
                    </td>
                </tr>
		<tr>
                    <th>    
                        <br><label for="numGroupe">Numéro groupe:</label>
                    </th>
                    <td>
                        <br>
                        <select name="numGroupe"  id="fieldGroupe">
                        <option value=""> </option>
                        <?php
                            foreach ($listGroupes as $key => $groupe) {?>
                            
                                <option value="<?php echo $groupe["idgrp"];?>" <?php echo ($groupe["idgrp"]==$formFilter->getnumGroupe()?"selected='selected'":"") ?>><?php echo $groupe["numgrp"];?></option>
                            
                            <?php } ?>
                        </select>
                    </td>                
                </tr>
                <tr>
                     <td colspan="2">
                         <button type="submit" class="right btn btn-default">Valider</button>
                         <button type="reset" class="right btn btn-default">Annuler</button>
                         
                    </td>

                </tr>
        </table>
        
</form>
<script language="javascript">
$( document ).ready((function() {
    $("#fieldEp").change(function () {
        $( "#fieldGroupe" ).load( "index.php?controller=seance&action=ajaxGetGroupes&numEp="+$("#fieldEp").val());
    });
}));
</script>
